From dee029e19ff1874e7483ccd3e5994bda6e3c7e5d Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 24 Jan 2022 16:22:54 +0800 Subject: [PATCH] * src/xterm.c (x_composite_image): Use the display's picture format. --- src/xterm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/xterm.c b/src/xterm.c index 6ca270ec06f..bf611db6bca 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -3488,14 +3488,15 @@ x_composite_image (struct glyph_string *s, Pixmap dest, { Display *display = FRAME_X_DISPLAY (s->f); #ifdef HAVE_XRENDER - if (s->img->picture) + if (s->img->picture && FRAME_X_PICTURE_FORMAT (s->f)) { Picture destination; XRenderPictFormat *default_format; XRenderPictureAttributes attr; + /* Pacify GCC. */ + memset (&attr, 0, sizeof attr); - default_format = XRenderFindVisualFormat (display, - DefaultVisual (display, 0)); + default_format = FRAME_X_PICTURE_FORMAT (s->f); destination = XRenderCreatePicture (display, dest, default_format, 0, &attr); -- 2.30.2